-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Rework target checking for built-in attributes #145085
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
66feb37
to
a1c6f2a
Compare
This comment has been minimized.
This comment has been minimized.
a1c6f2a
to
df39f8d
Compare
|
These commits modify the If this was unintentional then you should revert the changes before this PR is merged. This PR modifies Some changes occurred in compiler/rustc_attr_parsing Some changes occurred in compiler/rustc_passes/src/check_attr.rs |
This comment has been minimized.
This comment has been minimized.
df39f8d
to
c1958d7
Compare
This comment has been minimized.
This comment has been minimized.
c1958d7
to
166a734
Compare
This PR changes a file inside |
166a734
to
85f8262
Compare
This comment has been minimized.
This comment has been minimized.
85f8262
to
dcd4b10
Compare
This comment has been minimized.
This comment has been minimized.
dcd4b10
to
dd87861
Compare
This comment has been minimized.
This comment has been minimized.
If a PR is hard to merge due to repeated bitrot, we can always resort to a priority boost. |
ok, sounds good. Let's merge this ASAP with some p then? Then it merges before that rollup. I'll preemptively remake the rollup without the conflicting pr @bors r+ rollup=never p=1 |
Rework target checking for built-in attributes This is a refactoring of target checking for built-in attributes. This PR has the following goals: - Only refactor the 80% of the attributes that are simple to target check. More complicated ones like `#[repr]` will be in a future PR. Tho I have written the code in such a way that this will be possible to add in the future. - No breaking changes. - This part of the codebase is not very well tested though, we can do a crater run if we want to be sure. - I've spotted quite a few weird situations (like I don't think an impl block should be deprecated?). We can propose fixing these to in a future PR Fixes #143780 Fixes #138510 I've split it in commits and left a description on some of the commits to help review. r? `@jdonszelmann`
💔 Test failed - checks-actions |
@bors r+ spurious failure |
💡 This pull request was already approved, no need to approve it again.
|
This comment has been minimized.
This comment has been minimized.
Rework target checking for built-in attributes This is a refactoring of target checking for built-in attributes. This PR has the following goals: - Only refactor the 80% of the attributes that are simple to target check. More complicated ones like `#[repr]` will be in a future PR. Tho I have written the code in such a way that this will be possible to add in the future. - No breaking changes. - This part of the codebase is not very well tested though, we can do a crater run if we want to be sure. - I've spotted quite a few weird situations (like I don't think an impl block should be deprecated?). We can propose fixing these to in a future PR Fixes #143780 Fixes #138510 I've split it in commits and left a description on some of the commits to help review. r? `@jdonszelmann`
This comment has been minimized.
This comment has been minimized.
💔 Test failed - checks-actions |
- Added a few more variants which are needed for various attributes - Previously a trait method with default block had the same target representation as a method in a `impl trait for` block, this has been changed (See `MethodKind`) - Added `plural_name` for more precision on the form of the name
Every acceptor gets an `ALLOWED_TARGETS` specification which can specify per target whether it is allowed, warned, or errored.
Signed-off-by: Jonathan Brouwer <[email protected]>
7a85aa9
to
4ded0e3
Compare
This is a refactoring of target checking for built-in attributes.
This PR has the following goals:
#[repr]
will be in a future PR. Tho I have written the code in such a way that this will be possible to add in the future.Fixes #143780
Fixes #138510
I've split it in commits and left a description on some of the commits to help review.
r? @jdonszelmann